package command;

import java.util.Date;

import domain.User;


public class UserForm {
	private String userName;
	private String password;
	private String password2;
	private String name;
	private String lastName;
	private String email;
	private String question;
	private String answer;
	private String address;
	private String telephone;
	private String celular;
	private Date birthday;
	private boolean male;
	
	public UserForm(){
	}
	
	public UserForm(User user){
		this.userName=user.getUserName();
		this.password="";
		this.password2="";
		this.address=user.getAddress();
		this.answer=user.getAnswer();
		this.birthday=user.getBirthday();
		this.celular=user.getCelular();
		this.email=user.getEmail();
		this.lastName=user.getLastName();
		this.male=user.isMale();
		this.name=user.getName();
		this.question=user.getQuestion();
		this.telephone=user.getTelephone();
	}
	
	public void update(User user){
		user.setPassword(password);
		user.setAddress(address);
		user.setAnswer(answer);
		user.setBirthday(birthday);
		user.setCelular(celular);
		user.setEmail(email);
		user.setLastName(lastName);
		user.setMale(male);
		user.setName(name);
		user.setQuestion(question);
		user.setTelephone(telephone);
	}
	
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}	
	public void setPassword2(String password2) {
		this.password2 = password2;
	}
	public String getPassword2() {
		return password2;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getQuestion() {
		return question;
	}
	public void setQuestion(String question) {
		this.question = question;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public String getCelular() {
		return celular;
	}
	public void setCelular(String celular) {
		this.celular = celular;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public boolean isMale() {
		return male;
	}
	public void setMale(boolean male) {
		this.male = male;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}
}
